home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / arexx / prvpgifx.lha / PreviewPage.ifx next >
Text File  |  1996-04-06  |  2KB  |  99 lines

  1. /*
  2.  * $VER: PreviewPage 2.0 (5.04.96)
  3.  *
  4.  * Arexx program for the ImageFX image processing system.
  5.  * Written by Piotr Bieniek
  6.  *
  7.  * PreviewPage - creates preview pages for pictures.
  8.  *
  9.  */
  10.  
  11. OPTIONS RESULTS
  12.  
  13. /* change following variables (see ReadMe) */
  14. background = "Work:Multimedia/Scala/Backgrounds/Stones013"
  15. titlefont  = "BrooklynPLBold.font 30"
  16. titletext  = "Preview Page"
  17. font       = "helvetica.font 18"
  18.  
  19. 'Redraw Off'
  20. 'Undo Off'
  21.  
  22. /* load and display background */
  23. 'LoadBuffer' background 'Force'
  24. 'Text FONT' titlefont 'TEXT' titletext
  25. 'Point 320 20'
  26. 'KillBrush'
  27. 'Redraw'
  28.  
  29.  
  30. /* load, scale and paste pictures */
  31. do y=0 to 2
  32.   do x=0 to 3
  33.  
  34.     /* load picture */
  35.     'Swap'
  36.     'LoadBuffer Force'
  37.  
  38.     If rc=0 Then
  39.      do
  40.  
  41.       'GetMain'
  42.       Parse Var result '"'name'"' width height trash
  43.  
  44.       /* scale picture to the proper dimensions */
  45.       If width*512<height*640 Then
  46.        do
  47.         newwidth=width*102/height
  48.         newheight=102
  49.        end
  50.       Else
  51.        do
  52.         newwidth=128
  53.         newheight=height*128/width
  54.        end
  55.       'Scale' newwidth newheight
  56.  
  57.       /* paste picture */
  58.       'Swap'
  59.       'Swap2Brush'
  60.       'KillSwap'
  61.       'OutlineBrush'
  62.       'OutlineBrush'
  63.       'Point' 95+(150*x) 120+(150*y)
  64.       'KillBrush'
  65.  
  66.       /* extract filename only (without path) */
  67.       oldname=name
  68.       Parse Var oldname trash ':' name
  69.       If name='' Then name=oldname
  70.       do forever
  71.        oldname=name
  72.        Parse Var oldname trash '/' name
  73.        If name='' Then Leave
  74.       end
  75.  
  76.       'Text FONT' font 'TEXT' oldname
  77.       'Point' 95+(150*x) 186+(150*y)
  78.       'KillBrush'
  79.  
  80.       'Redraw' 20+(150*x) 50+(150*y) 150 150
  81.  
  82.      end
  83.  
  84.     Else
  85.      do
  86.       'Swap'
  87.       SIGNAL quit
  88.      end
  89.  
  90.   end
  91. end
  92.  
  93. /* quit */
  94. quit:
  95. 'Undo On'
  96. 'Redraw On'
  97.  
  98. EXIT
  99.